import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        int[] nums = {1,1,2};
        int t = 0;
        for (int i = 1; i < nums.length; i++) {
            if(t == 0||nums[i] != nums[i-1]){
                nums[t++] = nums[i];
            }
        }
        for (int i = 0; i < nums.length; i++) {
            System.out.println(nums[i]);
        }
    }
}
